import Comment from "@models/Comment.js";

export class CommentWithUser {
    userName: string
    originalComment: Comment
    userHeadPortraitUrl: string

    constructor(date: any) {
        this.userName = date.userName
        this.userHeadPortraitUrl = date.userHeadPortraitUrl
        this.originalComment = Comment.from(date.originalComment)
    }
    static from(data: any) {
        return new CommentWithUser(data)
    }
}